package com.example.actflow.eum;

public enum CompareOp {
    TEXT_EQUALS("文本等于"),
    TEXT_STARTS_WITH("文本前缀"),
    TEXT_ENDS_WITH("文本后缀"),
    GREATER_THAN("大于"),
    LESS_THAN("小于"),
    EQUALS("等于"),
    GREATER_OR_EQUAL("大于等于"),
    LESS_OR_EQUAL("小于等于");

    public final String displayName;

    CompareOp(String displayName) {
        this.displayName = displayName;
    }

    // 通过显示名称查找枚举
    public static CompareOp fromDisplayName(String displayName) {
        for (CompareOp op : values()) {
            if (op.displayName.equals(displayName)) {
                return op;
            }
        }
        return null;
    }

}